/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基础布局类 */
.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

/* 网格布局 */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* 间距类 */
.m-1 {
  margin: 4px;
}

.m-2 {
  margin: 8px;
}

.m-3 {
  margin: 12px;
}

.m-4 {
  margin: 16px;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-1 {
  margin-bottom: 4px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.ml-1 {
  margin-left: 4px;
}

.ml-2 {
  margin-left: 8px;
}

.ml-3 {
  margin-left: 12px;
}

.ml-4 {
  margin-left: 16px;
}

.mr-1 {
  margin-right: 4px;
}

.mr-2 {
  margin-right: 8px;
}

.mr-3 {
  margin-right: 12px;
}

.mr-4 {
  margin-right: 16px;
}

.p-1 {
  padding: 4px;
}

.p-2 {
  padding: 8px;
}

.p-3 {
  padding: 12px;
}

.p-4 {
  padding: 16px;
}

.pt-1 {
  padding-top: 4px;
}

.pt-2 {
  padding-top: 8px;
}

.pt-3 {
  padding-top: 12px;
}

.pt-4 {
  padding-top: 16px;
}

.pb-1 {
  padding-bottom: 4px;
}

.pb-2 {
  padding-bottom: 8px;
}

.pb-3 {
  padding-bottom: 12px;
}

.pb-4 {
  padding-bottom: 16px;
}

.pl-1 {
  padding-left: 4px;
}

.pl-2 {
  padding-left: 8px;
}

.pl-3 {
  padding-left: 12px;
}

.pl-4 {
  padding-left: 16px;
}

.pr-1 {
  padding-right: 4px;
}

.pr-2 {
  padding-right: 8px;
}

.pr-3 {
  padding-right: 12px;
}

.pr-4 {
  padding-right: 16px;
}

/* 文本样式 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

.font-normal {
  font-weight: 400;
}

.font-size-12 {
  font-size: 12px;
}

.font-size-14 {
  font-size: 14px;
}

.font-size-16 {
  font-size: 16px;
}

.font-size-18 {
  font-size: 18px;
}

.font-size-20 {
  font-size: 20px;
}

/* 颜色类 */
.text-primary {
  color: #1E88E5;
}

.text-secondary {
  color: #4CAF50;
}

.text-danger {
  color: #F44336;
}

.text-warning {
  color: #FF9800;
}

.text-purple {
  color: #9C27B0;
}

.text-gray {
  color: #909399;
}

.text-light-gray {
  color: #C0C4CC;
}

.text-dark {
  color: #303133;
}

.text-white {
  color: #FFFFFF;
}

/* 背景色类 */
.bg-primary {
  background-color: #1E88E5;
}

.bg-primary-light {
  background-color: #E3F2FD;
}

.bg-secondary {
  background-color: #4CAF50;
}

.bg-secondary-light {
  background-color: #E8F5E9;
}

.bg-danger {
  background-color: #F44336;
}

.bg-danger-light {
  background-color: #FFEBEE;
}

.bg-warning {
  background-color: #FF9800;
}

.bg-warning-light {
  background-color: #FFF3E0;
}

.bg-purple {
  background-color: #9C27B0;
}

.bg-purple-light {
  background-color: #F3E5F5;
}

.bg-white {
  background-color: #FFFFFF;
}

.bg-gray-100 {
  background-color: #F5F7FA;
}

.bg-gray-200 {
  background-color: #E4E7ED;
}

/* 边框类 */
.border {
  border: 1px solid #E4E7ED;
}

.border-dashed {
  border-style: dashed;
}

.border-top {
  border-top: 1px solid #E4E7ED;
}

.border-bottom {
  border-bottom: 1px solid #E4E7ED;
}

.border-left {
  border-left: 1px solid #E4E7ED;
}

.border-right {
  border-right: 1px solid #E4E7ED;
}

.border-primary {
  border-color: #1E88E5;
}

.border-secondary {
  border-color: #4CAF50;
}

.border-danger {
  border-color: #F44336;
}

.border-warning {
  border-color: #FF9800;
}

.border-gray {
  border-color: #909399;
}

/* 圆角类 */
.rounded {
  border-radius: 4px;
}

.rounded-lg {
  border-radius: 8px;
}

.rounded-full {
  border-radius: 50%;
}

/* 阴影类 */
.shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 尺寸类 */
.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.w-8 {
  width: 32px;
}

.h-8 {
  height: 32px;
}

.w-12 {
  width: 48px;
}

.h-12 {
  height: 48px;
}

/* 显示类 */
.hidden {
  display: none;
}

/* 定位类 */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bottom-0 {
  bottom: 0;
}

.z-10 {
  z-index: 10;
}

.z-20 {
  z-index: 20;
}

/* 其他常用类 */
.cursor-pointer {
  cursor: pointer;
}

.space-y-1 > * + * {
  margin-top: 4px;
}

.space-y-2 > * + * {
  margin-top: 8px;
}

/* 布局类 */
.layout-container {
  max-width: 750px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.layout-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.layout-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-top: 1px solid #e4e7ed;
  z-index: 10;
}

.layout-content {
  padding-top: 64px;
  padding-bottom: 80px;
}

/* 组件类 */
.component-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.component-button-primary {
  background-color: #1E88E5;
  color: #ffffff;
}

.component-button-secondary {
  background-color: #4CAF50;
  color: #ffffff;
}

.component-button-danger {
  background-color: #F44336;
  color: #ffffff;
}

.component-button-gray {
  background-color: #F5F7FA;
  color: #303133;
}

.component-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 16px;
}

.component-tabs {
  display: flex;
  border-bottom: 1px solid #e4e7ed;
}

.component-tab {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.component-tab-active {
  color: #1E88E5;
  border-bottom: 2px solid #1E88E5;
}

.component-form-item {
  margin-bottom: 16px;
}

.component-form-label {
  display: block;
  font-size: 12px;
  color: #909399;
  margin-bottom: 8px;
}

.component-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  font-size: 14px;
}

.component-form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  font-size: 14px;
}

/* 状态类 */
.state-hover:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.state-active {
  opacity: 0.8;
  transform: scale(0.98);
}

.state-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 主题类 */
.theme-primary {
  color: #1E88E5;
}

.theme-secondary {
  color: #4CAF50;
}

.theme-danger {
  color: #F44336;
}

.theme-warning {
  color: #FF9800;
}

.theme-bg-primary {
  background-color: #1E88E5;
}

.theme-bg-secondary {
  background-color: #4CAF50;
}

.theme-bg-danger {
  background-color: #F44336;
}

.theme-bg-warning {
  background-color: #FF9800;
}

.theme-bg-gray {
  background-color: #F5F7FA;
}

.space-y-3 > * + * {
  margin-top: 12px;
}

.space-y-4 > * + * {
  margin-top: 16px;
}

.space-x-1 > * + * {
  margin-left: 4px;
}

.space-x-2 > * + * {
  margin-left: 8px;
}

.space-x-3 > * + * {
  margin-left: 12px;
}

.space-x-4 > * + * {
  margin-left: 16px;
}

.gap-1 {
  gap: 4px;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

/* 过渡效果 */
.transition {
  transition: all 0.3s ease;
}

/* 容器类 */
.container {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* 响应式类 */
@media (max-width: 768px) {
  .grid-cols-2-md {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .grid-cols-1-sm {
    grid-template-columns: 1fr;
  }
}
